package com.hlm.demo.controller.moduleinfo;

import com.hlm.demo.common.ResultWrapper;
import com.hlm.demo.entity.ModuleInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @author  MRD
 */
@Controller
@RequestMapping("/module")
public class ModuleInfoController {

    /**
     *  查询模块表的所有信息
     */

    @RequestMapping("/findAllModule")
    @ResponseBody
    public ResultWrapper findAllModule(HttpServletRequest req){

        HttpSession session = req.getSession();
        List<ModuleInfo> moduleInfo = (List<ModuleInfo>) session.getAttribute("moduleInfo");

        return ResultWrapper.success(moduleInfo);


    }


}
